

#ifndef STRINGNODE_H_
#define STRINGNODE_H_
//#include <new.h>
#include "iostream"
//#include <conio.h>


class Node {
private: char element;
		 Node* next;
		 Node *prev;
public:	Node();
		Node* getNext();
		Node* getPrev();
		char  getElement();
		void  setElement(char e);
		void  setNext(Node* n);
		void  setPrev(Node* p);
		void  showElement();
		~ Node();
};
class StringByNode
{
	private:
		Node* root;
	public:
		StringByNode():root(NULL){}
	//	StringByNode(){root=NULL };
	//	operator <<();
		StringByNode(const StringByNode &){};
		void copy(StringByNode );
	//	StringByNode operator =(const StringByNode &rhs);
		bool isEquals(StringByNode );
		void deleteElement(int );
		StringByNode substr(int, int);
		int getLength();
		friend std::ostream& operator <<(std::ostream &os,  StringByNode str);
	//	void doTask();

		Node* getRoot(){
			return root;
		};

		void addElement(int pos, char);
		int find_first_of(char, int);
		char at(int);
		void  push_back(char e);
};


#endif /* STRINGNODE_H_ */
